﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using Jxym.DBUtility;


namespace Jxym.wlkc2011.Module.Default.server.notice
{
    public partial class noticeDetail : System.Web.UI.Page
    {
        MsSqlDal<model.Notice> notice = new MsSqlDal<model.Notice>();
        SqlParameter[] values = new SqlParameter[] { };
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) 
            {
                if (Request.Params["id2"] != null)
                {
                    int ID = Convert.ToInt32(Request.Params["id2"]);
                    model.Notice noticeModel = notice.GetModel("ID=" + ID, values);
                    this.lblTitle.Text = noticeModel.Title;
                    this.lblAddUser.Text = MyGet.GetUserInfoByID(noticeModel.AddUser).Name;
                    this.lblAddTime.Text = noticeModel.AddTime.ToString();
                    this.lblContent.Text = noticeModel.ContentText;
                    this.lblqwe.Text = MyGet.GetDeptInfoByID(MyGet.GetUserInfoByID(noticeModel.AddUser).DepartmentID).Name;
                }
            }
        }
    }
}